package com.net.web.controllers;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.ServletException;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.RedirectView;
import org.springframework.web.servlet.mvc.SimpleFormController;

import com.net.domain.*;

@SuppressWarnings("deprecation")
public class UserFormController extends SimpleFormController {
	
	@Override
	protected ModelAndView onSubmit(Object command) throws ServletException {
		User user = (User) command;		
		
		ModelAndView modelAndView = new ModelAndView(getSuccessView());
		modelAndView.addObject("user", user);
		return modelAndView;		
    }
}
